import './assets/main.css'

import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
import router, { setupRouter } from './router'

/**
 * 解决tailwind的样式冲突
 */
const meta = document.createElement('meta')
meta.name = 'naive-ui-style'
document.head.appendChild(meta)

async function bootstrap() {
  const app = createApp(App)

  // 配置pinia
  const pinia = createPinia()
  app.use(pinia)

  setupRouter(app)

  await router.isReady()
  app.mount('#app')
}

bootstrap()
